<?php

namespace App\Http\Controllers\stu;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;

class stucontroller extends Controller
{
    public function index(Request $request) 
    {

    	// dd($request);
    	echo $request->input('name');
    	echo $request->input('age',20);
    	echo '<pre>';
    	var_dump($request->all());
    	var_dump($request->input('like.0'));
    	var_dump($request->has('sex'));

    }

    public function demo()
    {

    	$content = file_get_contents('./image/file1.jpg');

    	$status = 200;

    	$value = 'image/jpg';

    	return (new Response($content,$status))->header('Content-Type',$value);

    }

}
